window.onload = function () {
    //<editor-fold desc="Changeable Configuration Block">
    let urls = []
    axios.get('/swagger/index/config')
        .then(function (response) {
            urls = response.data.urls
            initSwagger(urls)
        })

    function initSwagger(urls) {
        window.ui = SwaggerUIBundle({
            // url: "/swagger/index/api?module=admin",
            urls: urls,
            dom_id: '#swagger-ui',
            deepLinking: true,
            presets: [
                SwaggerUIBundle.presets.apis,
                SwaggerUIStandalonePreset
            ],
            plugins: [
                SwaggerUIBundle.plugins.DownloadUrl
            ],
            layout: "StandaloneLayout"
        });
    }

    // the following lines will be replaced by docker/configurator, when it runs in a docker-container


    //</editor-fold>
};
